import User.Administrators;
import User.RegularUsers;
import User.User;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-24
 * Time: 17:28
 */
public class Mian {
    public static User login(){
        System.out.println("请输入您的名字");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        System.out.println("请输入您的身份：1: 普通用户  2: 管理员");
        int choice = scanner.nextInt();
        if(choice == 1){
            return new RegularUsers(name);
        }else{
            return new Administrators(name);
        }
    }
    public static void main(String[] args) {
        User user = login();
        user.menu();
    }
}
